#	$OpenBSD: genassym.cf,v 1.25 2015/03/18 20:49:40 miod Exp $
#	$NetBSD: genassym.cf,v 1.2 1997/06/28 19:59:04 pk Exp $

#
# Copyright (c) 1997 Christos Zoulas.  All rights reserved.
# Copyright (c) 1992, 1993
#	The Regents of the University of California.  All rights reserved.
#
# This software was developed by the Computer Systems Engineering group
# at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
# contributed to Berkeley.
#
# All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
#	This product includes software developed by the University of
#	California, Lawrence Berkeley Laboratory.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
# 3. Neither the name of the University nor the names of its contributors
#    may be used to endorse or promote products derived from this software
#    without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
#	@(#)genassym.c	8.1 (Berkeley) 6/11/93
#

include <sys/param.h>
include <sys/buf.h>
include <sys/proc.h>
include <sys/mbuf.h>
include <sys/msgbuf.h>
include <sys/syscall.h>
include <sys/user.h>
include <sys/device.h>
include <sys/disklabel.h>
include <sys/disk.h>

include <uvm/uvm_extern.h>

include <machine/pmap.h>
include <machine/cpu.h>
include <machine/intr.h>

include <machine/oldmon.h>
include <machine/bsd_openprom.h>

include <sparc/sparc/cpuvar.h>

include <sparc/dev/audioamdvar.h>

include <sparc/dev/fdreg.h>
include <sparc/dev/fdvar.h>

# general constants
export	SUN4_PGSHIFT
export	SUN4CM_PGSHIFT
export	IOSPACE_BASE
if defined(VM_MIN_KERNEL_ADDRESS)
export	VM_MIN_KERNEL_ADDRESS
endif

# proc fields and values
struct	proc
member	p_addr
member	p_stat
member	p_wchan
member	p_vmspace

export	SRUN
export	SONPROC

# VM structure fields
define	VM_PMAP		offsetof(struct vmspace, vm_map.pmap)
struct	pmap
member	PMAP_CTX	pm_ctx
member	PMAP_CTXNUM	pm_ctxnum

# interrupt/fault metering
struct	uvmexp		V_
member	swtch
member	INTR		intrs
member	faults
member	softs

# CPU info structure
struct	cpu_softc
member  CPUINFO_GETSYNCFLT      get_syncflt
member  CPUINFO_GETASYNCFLT     get_asyncflt
member  CPUINFO_SYNCFLTDUMP     syncfltdump
member	CPUINFO_PURE_VCACHE_FLS	pure_vcache_flush
member	CPUINFO_CURPROC		ci.ci_curproc

# PTE bits and related information
export	PG_W
export	PG_VSHIFT
export	PG_PROTSHIFT
export	PG_PROTUREAD
export	PG_PROTUWRITE
if defined(SUN4M)
export	SRMMU_TETYPE
export	SRMMU_TEPTE
export	SRMMU_PROT_MASK
export	PPROT_R_RW
export	PPROT_RX_RX
export	PPROT_RWX_RWX
export	PPROT_WRITE
endif

# FPU state
struct	fpstate
member	fs_regs
member	fs_fsr
member	fs_qsize
member	fs_queue
export	FSR_QNE

# system calls
export	SYS_sigreturn
export	SYS_execve
export	SYS_exit

# errno
export	EFAULT
export	ENAMETOOLONG

# PCB fields
struct	pcb
member	pcb_nsaved
member	pcb_onfault
member	pcb_psr
member	pcb_rw
member	pcb_sp
member	pcb_pc
member	pcb_uw
member	pcb_wim
member	pcb_wcookie

# interrupt enable register PTE
define	IE_REG_PTE_PG	(PG_V | PG_W | PG_S | PG_NC | PG_OBIO)

# intrhand fields.
struct	intrhand
member	ih_fun
member	ih_arg
member	ih_ipl
member	ih_next
member	IH_COUNT	ih_count.ec_count

# sintrhand fields.
struct	sintrhand
member	sih_pending

ifdef notyet
# ZSCC interrupt fields
struct	zs_softc	Z
member	sc_a
member	sc_b
struct	zs_line
member	zl_wreg
member	zl_tbc
member	zl_tba
member	zl_rbput
member	zl_rbuf
define	ZSRR1_DO_bit	ffs(ZSRR1_DO) - 1
endif

# audio trap handler fields
struct	auio
member	au_amd
member	au_rdata
member	au_rend
member	au_pdata
member	au_pend
member	AU_COUNT	au_ih.ih_count.ec_count
member	au_swih

export	PROM_BASE

struct	promvec
member	pv_nodeops
member	pv_halt
member	PV_EVAL		pv_fortheval.v0_eval
member	pv_romvec_vers

struct	nodeops
member	no_nextnode
member	no_getprop

struct	om_vector	OLDMON_
member	printf
member	HALT		exitToMon

# floppy trap handler fields
struct	fdcio
member	FDC_REG_MSR	fdcio_reg_msr
member	FDC_REG_FIFO	fdcio_reg_fifo
member	FDC_ITASK	fdcio_itask
member	FDC_ISTATUS	fdcio_istatus
member	FDC_STATUS	fdcio_status
member	FDC_NSTAT	fdcio_nstat
member	FDC_DATA	fdcio_data
member	FDC_TC		fdcio_tc
member	FDC_COUNT	fdcio_ih.ih_count.ec_count
member	FDC_SIH		fdcio_sih
